package model

type NocobaseBase struct {
	Id          uint   `gorm:"column:id;type:bigint;not null;primary_key"`
	CreatedAt   string `gorm:"column:createdAt;type:timestamp;not null"`
	UpdatedAt   string `gorm:"column:updatedAt;type:timestamp;not null"`
	CreatedByID string `gorm:"column:createdById;type:timestamp;not null"`
	UpdatedByID string `gorm:"column:updatedById;type:timestamp;not null"`
}

type NocobaseMusicmeta struct {
	NocobaseBase
	UUID       string `gorm:"column:UUID;type:varchar(255);not null"`
	Title      string `gorm:"column:title;type:varchar(255);not null"`
	Properties string `gorm:"column:properties;type:text"`
	ThumbUrl   string `gorm:"column:ThumbUrl;type:text"`
}

func (NocobaseMusicmeta) TableName() string {
	return "MusicMeta"
}

type NocobaseField struct {
	Key            string                 `gorm:"column:key;type:varchar(255);not null"`
	Name           string                 `gorm:"column:name;type:varchar(255);not null"`
	Type           string                 `gorm:"column:type;type:varchar(255);not null"`
	Interface      string                 `gorm:"column:interface;type:varchar(255);not null"`
	CollectionName string                 `gorm:"column:collectionName;type:varchar(255);not null"`
	Options        map[string]interface{} `gorm:"column:options;type:json;not null"`
}

func (NocobaseField) TableName() string {
	return "field"
}
